/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package matching;


import matching.path.Path;
import matching.triple.ObjectPropertyTriple;
import matching.xml.MatchTypes;
import matching.xml.MatchElements;
import matching.xml.MatchingXML;
import ontology.Ontology;
import org.jdom.Attribute;
import org.jdom.Element;

/**
 *
 * @author livia
 */
public class ObjectPropertyMatch extends Match {

    private Path path;
    
    public ObjectPropertyMatch(ObjectPropertyTriple source, ObjectPropertyTriple target, Ontology ontoSrc, Ontology ontoTgt) {
        this.source = source;
        this.target = target;
        this.ontoSrc = ontoSrc;
        this.ontoTgt = ontoTgt;
    }

    public Element toElementXML(){
        Element match = new Element("match");
        match.setAttribute(new Attribute( MatchElements.type, MatchTypes.objPropMatch, MatchingXML.uriXmlns));
        Element src = source.toElementXML("source");
        Element tgt = target.toElementXML("target");
        match.addContent(src);
        match.addContent(tgt);
        return match;
    }


    public boolean hasPath(){
        return path!=null;
    }

    public void setPath(){

    }

    public Path getPath(){
        return  path;
    }

}
